package dtos;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;



public class MeasureunitDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5291772966632212052L;

	private int id;
	
	private String name;
	private List<Integer> restickets=new ArrayList<>();

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Integer> getRestickets() {
		return restickets;
	}

	public void setRestickets(List<Integer> restickets) {
		this.restickets = restickets;
	}
	
	public void addResticket(int id) {
		this.restickets.add(id);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MeasureunitDTO other = (MeasureunitDTO) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
	
	

}
